package com.bigfire.dtm.api.web.facade;

import com.bigfire.dtm.api.dto.resp.CapabilityRespDTO;
import com.bigfire.dtm.shared.common.Pagination;
import com.bigfire.dtm.shared.common.ResponseWrapper;
import com.bigfire.dtm.shared.constant.ApiConstants;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;


/**
 * 胜任力模型数据接口
 * @author Damon S.
 * @version v1.0.1
 * @date 2020年05月05日 14:33
 */
@RequestMapping(value = "/dtm" + ApiConstants.API_V1 + "/capability", produces = MediaType.APPLICATION_JSON_VALUE)
public interface CapabilityFacade {

    /**
     * 获取员工个人的能力模型评估结果
     * @return 返回评估结果
     */
    @GetMapping("/personals")
    ResponseWrapper<Pagination<CapabilityRespDTO>> findByUserId(HttpServletResponse response);

    /**
     * 获取员工个人的能力模型评估结果
     * @return 返回评估结果
     */
    @GetMapping("/personals/{userId}")
    ResponseWrapper<CapabilityRespDTO> findByUserId(
            @PathVariable("userId")Long userId, HttpServletResponse response
    );
}
